package com.tencent50.easy;

/**
 * @author zhengTao
 * @version 1.0
 * @description: 回文数
 * @date 2022/7/20 12:29
 */
public class Demo01 {


    public boolean isPalindrome(int x) {
        String s = String.valueOf(x);
        int i=0;
        int j=s.length()-1;
        while (i<j){
            char c = s.charAt(i);
            char t = s.charAt(j);
            if(c!=t){
             return false;
            }
            i++;
            j--;
        }
        return true;

    }
}
